/**
 * Copyright 2010 upTick Pty Ltd
 *
 * Licensed under the terms of the GNU General Public License version 3 
 * as published by the Free Software Foundation. You may obtain a copy of the
 * License at: http://www.gnu.org/copyleft/gpl.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations 
 * under the License.
 */

package au.com.uptick.serendipity.shared.dto;

import java.io.Serializable;

public class AccountDto implements Serializable {

    private static final long serialVersionUID = -8085651666553487122L;

    //
    private static final String ACCOUNT_ID_DISPLAY_NAME = "Account Id";
    private static final String ACCOUNT_NAME_DISPLAY_NAME = "Account Name";
    private static final String ACCOUNT_NUMBER_DISPLAY_NAME = "Account Number";

    /*
    private static final String PARENT_ACCOUNT_DISPLAY_NAME = "Parent Account";
    private static final String PRIMARY_CONTACT_DISPLAY_NAME = "Primary Contact";
    private static final String RELATIONSHIP_TYPE_DISPLAY_NAME = "Relationship Type";
    private static final String MAIN_PHONE_DISPLAY_NAME = "Main Phone";
    private static final String OTHER_PHONE_DISPLAY_NAME = "Other Phone";
    private static final String FAX_DISPLAY_NAME = "Fax";
    private static final String WEB_SITE_DISPLAY_NAME = "Web Site";
    private static final String EMAIL_DISPLAY_NAME = "Email";
    */

    private Long accountId;
    private String accountName;
    private String accountNumber;
    private String parentAccount;
    private String primaryContact;
    private String relationshipType;
    private String mainPhone;
    private String otherPhone;
    private String fax;
    private String webSite;
    private String email;

    public AccountDto() {
    }

    public AccountDto(Long accountId) {
        this.accountId = accountId;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getAccountNumber() {
        return accountNumber;
    }

    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
    }

    public String getParentAccount() {
        return parentAccount;
    }

    public void setParentAccount(String parentAccount) {
        this.parentAccount = parentAccount;
    }

    public String getPrimaryContact() {
        return primaryContact;
    }

    public void setPrimaryContact(String primaryContact) {
        this.primaryContact = primaryContact;
    }

    public String getRelationshipType() {
        return relationshipType;
    }

    public void setRelationshipType(String relationshipType) {
        this.relationshipType = relationshipType;
    }

    public String getMainPhone() {
        return mainPhone;
    }

    public void setMainPhone(String mainPhone) {
        this.mainPhone = mainPhone;
    }

    public String getOtherPhone() {
        return otherPhone;
    }

    public void setOtherPhone(String otherPhone) {
        this.otherPhone = otherPhone;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getWebSite() {
        return webSite;
    }

    public void setWebSite(String webSite) {
        this.webSite = webSite;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(ACCOUNT_ID_DISPLAY_NAME).append(": ").append(getAccountId()).append(", ");
        sb.append(ACCOUNT_NAME_DISPLAY_NAME).append(": ").append(getAccountName()).append(", ");
        sb.append(ACCOUNT_NUMBER_DISPLAY_NAME).append(getAccountNumber());

        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((accountName == null) ? 0 : accountName.hashCode());
        return result;
    }
}
